<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;

class SystemNoticeType extends Model
{
	use HasDateTimeFormatter;
    protected $table = 'eb_system_notice_type';
    public static function booted()
    {
        parent::booted();
        static::creating(function (SystemNoticeType $model){
            if(empty($model->min_page)){
                $model->min_page = '';
            }
            if(empty($model->ios_page)){
                $model->ios_page = '';
            }
            if(empty($model->system_id)){
                $model->system_id = 0;
            }
            if(empty($model->an_page)){
                $model->an_page = '';
            }
        });
    }
}
